//package com.third;

//public class java2_2 {
//    public static void main(String[] args) {
//        //逻辑运算符 & | ^ ！ && ||
////        int a = 10;
////        int b = 20;
////        if (a > 15 & b > 15) {
////            System.out.println("yes");
////        }
////        else{
////            System.out.println("no");
////        }
////        int a = 10;
////        int b = 20;
////        if (a > 15 | b > 15) {
////            System.out.println("yes");
////        }
////        else{
////            System.out.println("no");
////        }
////        Scanner sc = new Scanner(System.in);
////        System.out.println("请输入数字:");
////        int age = sc.nextInt();
////        int j = 0;
////        if (age > 18 | j++ > 2) {
////            System.out.println("yes");
////        }
////        System.out.println(j);  //j == 1;
//    }
//}
//package com.third;
//public class java2_2 {
//}
//package com.third;
//public class java2_2 {
//    public static void main(String[] args) {
//
//    }
//}

//package com.third;
//
//import java.util.Scanner;
//
//public class java2_2 {
//    public static void main(String[] args) {
////        Scanner sc = new Scanner(System.in);
////        int age = sc.nextInt();
////        if (!(age > 18)) {
////            System.out.println("你还未成年");
////        }
////        System.out.println(!true);
//        // && and || 会有可能只算一半
//        Scanner sc = new Scanner(System.in);
//        int age = sc.nextInt();
//        int j = 0;
//        if (age > 18 && j++ > 2) {
//            System.out.println("yes");
//        }
//        System.out.println(j);
//    }
//}
//
//package com.third;
//
//public class java2_2 {
//    public static void main(String[] args) {
//        //三种语句  ---  顺序——判断——孙环
////        for (int i = 0; i < 10; i++) {
////            System.out.println(i);
////        }
//    }
//}

//package com.third;
//
//import java.util.Random;
//
//public class java2_2 {
//    //    public static void main(String[] args) {
////        Random r = new Random();
////        int num = r.nextInt(10);
////        System.out.println(num);
////    }
//    public static void main(String[] args) {
////        for (int i = 0; i < 10; i++) {
////            Random r = new Random();
////            int num1 = r.nextInt(10);
////            System.out.println(num1);
////        }
//        Random r = new Random();
//        for (int i = 0; i < 10; i++) {
//            int num2 = r.nextInt(5) + 3;
//            System.out.println(num2);
//        }
//    }
//}
//
//package com.third;
//
//public class java2_2 {
//    //    public static void main(String[] args) {
////        String[] name = new String[]{"zhangsan", "lisi", "wangwu"};
////        String[] name1 = {"zhaoliu","coco"};
////    }
//    public static void main(String[] args) {
//        int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
//        for (int i = 0; i < arr.length; i++) {
//            System.out.print(arr[i]);
//            //printle一行一行打印，print一行打印所有
//        }
//    }
//}


//import java.util.Scanner;
//
//public class java2_2 {
////    public static void main(String[] args) {
////        //流程控制语句的分类
////        //（1）顺序结构
////        //（2）分支结构
////        //（3）循环结构
////        //1.
//////        int age = 10;
//////        System.out.println(age);
////        //2.
//////        Scanner sc = new Scanner(System.in);
//////        System.out.println("请输入你的年龄：");
//////        int age = sc.nextInt();
//////        if (age > 18) {
//////            System.out.println("已成年");
//////        }
//////        Scanner sc = new Scanner(System.in);
//////        System.out.print("请您输入你的年龄：");
//////        int age = sc.nextInt();
//////        if (age > 18) {
//////            System.out.println("已经成年了");
//////        } else {
//////            System.out.println("还未成年");
//////        }
//////        Scanner sc = new Scanner(System.in);
//////        while (true) {
//////            System.out.print("请你输入你的成绩：");
//////            int score = sc.nextInt();
//////            if (score >= 90) {
//////                System.out.println("A");
//////            } else if (score >= 80) {
//////                System.out.println("B");
//////            } else if (score >= 70) {
//////                System.out.println("C");
//////            } else if (score >= 60) {
//////                System.out.println("D");
//////            } else {
//////                System.out.println("E");
//////            }
//////        }
//////
////
////    }
//public static void main(String[] args) {
//
//}
//}
//package com.third;
//
//import java.util.Scanner;
//
//public class java2_2 {
//    public static void main(String[] args) {
////        switch语句  byte short int char String 枚举
////        Scanner sc = new Scanner(System.in);
////        System.out.print("请输入你的天数：");
////        String day = sc.next();
////        switch(day)
////        {
////            case "周一":
////                System.out.println("Monday");
////                break;
////            case "周二":
////                System.out.println("Tuesday");
////                break;
////            case "周三":
////                System.out.println("3");
////                break;
////            case "周四":
////                System.out.println("4");
////                break;
////            case "周五":
////                System.out.println("5");
////                break;
////            case "周六":
////                System.out.println("6");
////                break;
////            case "周七":
////                System.out.println("7");
////                break;
////            default:
////                System.out.println("您的输入有误，请重新输入：");
////                break;
////        }
//
//    }
//}
package com.third;

//import java.util.Random;
//import java.util.Scanner;

public class java2_2 {
    //    public static void main(String[] args) {
//    //
//////                switch语句  byte short int char String 枚举
////        Scanner sc = new Scanner(System.in);
////        System.out.print("请输入你的天数：");
////        String day = sc.next();
////        switch(day)
////        {
////            case "周一":
////                System.out.println("Monday");
////            case "周二":
////                System.out.println("Tuesday");
////            case "周三":
////                System.out.println("3");
////            case "周四":
////                System.out.println("4");
////            case "周五":
////                System.out.println("5");
////                break;
////            case "周六":
////                System.out.println("6");
////                break;
////            case "周七":
////                System.out.println("7");
////                break;
////            default:
////                System.out.println("您的输入有误，请重新输入：");
////                break;
////        }
////    }
//    //switch有穿透性
////public static void main(String[] args) {
////    //循环语句
////    //(1) for
////    //(2) while
////    //(3) do while
////    //打印1-10
//////    for (int i = 0; i < 11; i++) {
//////        System.out.print(i);
//////        System.out.print(" ");
//////    }
////
////}
////    public static void main(String[] args) {
////        int sum = 0;
////        for (int i = 0; i < 11; i++) {
////            sum += i;
////        }
////        System.out.println(sum);
////    }
////    public static void main(String[] args) {
////        //使用while打印1-10；
////        int i = 1;
////        while (i <= 10) {
////            System.out.println(i);
////            i++;
////        }
////    }
////    public static void main(String[] args) {
////        //do while
////        int i = 1;
////        do {
////            System.out.println(i);
////            i++;
////        } while (i <= 10);
////    }
////    public static void main(String[] args) {
////        //死循环  and  嵌套循环
//////        for(;;){
//////            System.out.println(100);
//////        }
//////        while(true){  //经典
//////            System.out.println(100);
//////        }
////    }
////    public static void main(String[] args) {
////        for (int i = 0; i < 10; i++) {
////            if(i == 3)
////                continue;
////            System.out.println(i);
////        }
////    }
////    public static void main(String[] args) {
////        int i = 0;
////        while(i<=10){
////            if(i == 5){
////                break;
////            }
////            System.out.println(i);
////            i++;
////        }
////    }
////    public static void main(String[] args) {
////
////        for (int i = 0; i < 3; i++) {
////            for (int j = 0; j < 5; j++) {
////                System.out.print(j);
////                System.out.print(" ");
////            }
////            System.out.print("\n");
////        }
////
////    }
////    public static void main(String[] args) {
////        //生成随机数
//////        Random r = new Random();
//////        int num = r.nextInt(11);
//////        System.out.println(num);
//////        Random r = new Random();
////    }
////    public static void main(String[] args) {
////        Random r = new Random();
////        int num = r.nextInt(5) + 7;
////        System.out.println(num);
////    }
//    //猜数字小游戏//
//    public static void main(String[] args) {
//        Random r = new Random();
//        Scanner sc = new Scanner(System.in);
//        int num = r.nextInt(101);
//        while(true){
//            System.out.print("请输入数字：");
//            int my_num = sc.nextInt();
//            if(my_num > num){
//                System.out.println("你输入的数字过大！");
//            } else if (my_num < num) {
//                System.out.println("你输入的数字过小！");
//            }else {
//                System.out.println("恭喜你，猜对了！");
//                System.out.println(num);
//            }
//        }
//
//    }
    public static void main(String[] args) {
        //数组  静态数组  and  动态数组
//        int[] age = new int[]{10, 20, 30, 40, 50, 60, 70};
//        int[] age1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
//        for (int i = 0; i < age1.length; i++) {
//            System.out.println(age1[i]);
//        }
        int[] age = new int[4];
        age[0] = 18;
        age[1] = 20;
        age[2] = 30;
        age[3] = 40;
        for (int i = 0; i < age.length; i++) {
            System.out.println(age[i]);
        }
    }
}